

export function request(options) {
  uni.showLoading({
		title:"数据加载中",
		mask: true
  })
  return new Promise((resolve, reject) => {
    uni.request({
      url: options.url,
      method: options.method || 'GET',
      data: options.data || {},
      header: options.header || {},
      success: (res) => {
        resolve(res.data);
      },
      fail: (err) => {
        reject(err);
      },
	  complete: () => {
	  	uni.hideLoading()
	  }
    });
  });
}